package com.jianbing.entity;

import com.alibaba.fastjson.annotation.JSONField;
import io.netty.channel.Channel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * Created by hantixiang on 2017/1/17.
 */
public class ProxyIp {
    private String ip;
    private int port;
    private String account;
    private String password;
    private Integer source;
    private String id;
    @JSONField(serialize = false)
    private Channel channel;

    public void setChannel(Channel channel) {
        this.channel = channel;
    }

    public Channel getChannel() {
        return channel;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {

        return id;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    @JSONField(format = "yyyy-MM-dd HH:mm:ss", ordinal = 100)
    private Date createDate;

    public void setIp(String ip) {
        this.ip = ip;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public String getIp() {

        return ip;
    }

    public int getPort() {
        return port;
    }

    public String getAccount() {
        return account;
    }

    public String getPassword() {
        return password;
    }

    public Integer getSource() {
        return source;
    }

    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
